package com.ruoyi.system.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.ruoyi.system.domain.WOrderGood;
import com.ruoyi.system.domain.vo.WOrderGoodVO;

/**
 * 物品Mapper接口
 * 
 * @author ruoyi
 * @date 2021-12-05
 */
public interface WOrderGoodMapper 
{
    /**
     * 查询物品
     * 
     * @param id 物品主键
     * @return 物品
     */
    public WOrderGood selectWOrderGoodById(Long id);

    /**
     * 查询物品列表
     * 
     * @param wOrderGood 物品
     * @return 物品集合
     */
    public List<WOrderGood> selectWOrderGoodList(WOrderGood wOrderGood);
    
    public List<WOrderGoodVO> selectWOrderGoodVOList(WOrderGood wOrderGood);
    
    public List<WOrderGoodVO> selectWOrderGoodVONewList(WOrderGood wOrderGood);

    /**
     * 新增物品
     * 
     * @param wOrderGood 物品
     * @return 结果
     */
    public int insertWOrderGood(WOrderGood wOrderGood);

    /**
     * 修改物品
     * 
     * @param wOrderGood 物品
     * @return 结果
     */
    public int updateWOrderGood(WOrderGood wOrderGood);
    
    /**
     * 查询锁定的数量
     * @param wOrderGood
     * @return
     */
    public WOrderGood selectWOrderGoodNum(@Param("goodsId")Long goodsId);
    
    
    public WOrderGood selectWOrderGoodNumNotOrderId(@Param("goodsId")Long goodsId,@Param("orderId" ) Long orderId);

    /**
     * 删除物品
     * 
     * @param id 物品主键
     * @return 结果
     */
    public int deleteWOrderGoodById(Long id);
    public int deleteWOrderGoodByOrderId(@Param("orderId") Long orderId);

    /**
     * 批量删除物品
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteWOrderGoodByIds(Long[] ids);
}
